#include <cmath>
#include <iostream>
#include <string>
using namespace std;
class Jiami{
private:
  int number;
public:
Jiami(int num) : number(num) {}
string encrypt() {
  string result;
  int temp;
  for (int i = 0; i < 4; ++i) {
    temp = ((number / static_cast<int>(pow(10, i)) % 10) + 13) % 26;  
    //取第 i 位数字并加 13 取模 26
    if (temp == 0) {
    //处理取模结果为 0 的情况，将其映射为 'Z'
    result = 'Z' + result;
    } 
    else {
    result = static_cast<char>('A' + temp - 1) + result; 
    //映射为对应的大写字母
    }
  }
return result;
}
};
int main() {
  int input;
  cin >> input;
  Jiami encryptor(input);
  cout << encryptor.encrypt();
  return 0;
}